<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>Users List</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <%= stylesheet_link_tag "../javascripts/ext/resources/css/ext-all.css" %>
        <%= stylesheet_link_tag "/stylesheets/blue.css" %>
        <%= stylesheet_link_tag "/stylesheets/images.css" %>
        <%= javascript_include_tag "/javascripts/ext/adapter/prototype/prototype.js" %>
        <%= javascript_include_tag "/javascripts/ext/adapter/prototype/scriptaculous.js" %>
        <%= javascript_include_tag "/javascripts/ext/adapter/prototype/effects.js" %>
        <%= javascript_include_tag "/javascripts/ext/adapter/prototype/ext-prototype-adapter.js" %>
        <!-- LIBS -->
        <!--<%= javascript_include_tag "/javascripts/ext/adapter/ext/ext-base.js" %>-->
        <!-- ENDLIBS -->
        <%= javascript_include_tag "/javascripts/ext/ext-all-debug.js" %>
        <%= javascript_include_tag "/javascripts/ext/build/locale/ext-lang-zh_CN.js" %>
    </head>
    <body>
    	<div id='hello'></div>
		<div id='hello1'></div>
        <script>
            //package("trailblazer.user");
            //package("feyaSoft.demouser");
            //Ext.namespace("trailblazer.user");
            /*
             * Ext JS Library 2.0.2
             * Copyright(c) 2006-2008, Ext JS, LLC.
             * licensing@extjs.com
             *
             * http://extjs.com/license
             */
            Ext.onReady(function(){
                Ext.QuickTips.init();
                Ext.form.Field.prototype.msgTarget = 'side';
                var window = new Ext.Window({
                    title: '增加空港管理',
                    width: 300,
                    height: 150,
                    minWidth: 300,
                    minHeight: 150,
                    layout: 'fit',
                    plain: true,
                    bodyStyle: 'padding:5px;',
                    buttonAlign: 'center',
                    items: [{
                        tag: '<SPAN class=hilite2>iframe</SPAN>',
                        src: 'http://www.163.com'
                    }],
                    modal: true,
                    buttons: [{
                        text: '增加',
                        handler: function(){
                            // check form value 
                            if (formPanel.form.isValid()) {
                                formPanel.form.submit({
                                    waitMsg: 'In processing',
                                    success: function(form, action){
                                        Ext.MessageBox.alert('提示', '提交成功');
                                        window.destroy();
                                        dataStore.load();
                                    },
                                    failure: function(form, action){
                                        Ext.MessageBox.alert('提交错误消息', '提交失败');
                                    }
                                });
                            }
                            else {
                                Ext.MessageBox.alert('错误提示', '请按要求填写必输选项.');
                            }
                        }
                    }, {
                        text: '取消',
                        handler: function(){
                            window.destroy();
                        }
                    }]
                });
                new Ext.Panel({
                    renderTo: "hello",
                    title: "容器组件",
                    width: 500,
                    height: 200,
                    layout: "accordion",
					collapsible: false,
                    layoutConfig: {
						collapsible: false,
                        animate: true
                    },
                    items: [{
                        title: "子元素1",
                        html: "<iframe src='http://www.163.com'></iframe>"
                    }]
                
                });
				
				new Ext.Panel({
					renderTo: "hello1",
                    frame: true,
                    title: 'Views',
                    collapsible: true,
                    contentEl: 'task-views',
                    titleCollapse: true,
					html: "<iframe src='http://www.163.com'></iframe>"
                });
                //window.show();
            });
        </script>
    </body>
</html>
